:root {
    --primary: #1565C0;
    --primary-light: rgba(21, 101, 192, 0.1);
    --primary-lighter: rgba(21, 101, 192, 0.05);
    --accent: #CC174C;
    --accent-light: rgba(204, 23, 76, 0.1);
    --white: #ffffff;
    --text-dark: #333;
    --text-light: #666;
    --border-light: #e0e0e0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: #f8f9fa;
}

.fixed-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    background: linear-gradient(135deg, var(--primary), #0d47a1);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    padding: 20px 0;
}

.fixed-header .container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.fixed-header h1 {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
}

.fixed-header h1 i {
    font-size: 2rem;
}

.fixed-header p {
    font-size: 1.1rem;
    margin-bottom: 0;
    opacity: 0.9;
    text-align: center;
}

.fixed-header .badge {
    font-size: 0.85rem;
}

/* The margin-top will be dynamically set by JS based on header height */
.content-wrapper {
    padding-bottom: 50px;
}

/* scroll-margin-top will be dynamically set by JS based on header height */
section[id],
div[id] {
    /* fallback for no JS */
    scroll-margin-top: 180px;
}

.policy-nav {
    position: sticky;
    /* fallback for no JS */
    top: 180px;
    z-index: 100;
    transition: top 0.3s ease-in-out;
}

.policy-nav .card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 5px 20px var(--primary-lighter);
    background: var(--white);
    overflow: hidden;
}

.policy-nav .card-header {
    background: var(--primary);
    color: var(--white);
    padding: 18px 25px;
    border-bottom: none;
    font-size: 1.15rem;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.policy-nav .card-body {
    padding: 0;
}

.policy-nav .nav-link {
    color: var(--text-dark);
    border-radius: 0;
    padding: 14px 25px;
    margin-bottom: 0;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
    display: flex;
    align-items: center;
    font-size: 1rem;
    font-weight: 500;
}

.policy-nav .nav-link:hover {
    background: var(--primary-lighter);
    color: var(--primary);
}

.policy-nav .nav-link.active {
    background: var(--primary-light);
    color: var(--primary);
    border-left: 4px solid var(--primary);
    font-weight: 600;
}

.policy-nav .nav-link i {
    margin-right: 15px;
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
    color: var(--primary);
}

.policy-nav .nav-link.active i {
    color: var(--primary);
}

/* Support Card */
.policy-nav .support-card {
    background: var(--primary);
    color: var(--white);
    padding: 25px;
    border-radius: 10px;
    margin-top: 30px;
    box-shadow: 0 5px 20px var(--primary-lighter);
    text-align: center;
}

.policy-nav .support-card i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: var(--white);
    opacity: 0.9;
}

.policy-nav .support-card h5 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    font-weight: 600;
    color: var(--white);
}

.policy-nav .support-card .btn {
    background: var(--accent);
    color: var(--white);
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.policy-nav .support-card .btn:hover {
    background: #b0123f;
    /* darken by approx 10% */
    transform: translateY(-2px);
}

.section-card {
    background: var(--white);
    border-radius: 10px;
    box-shadow: 0 5px 20px var(--primary-lighter);
    margin-bottom: 30px;
    border: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.section-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.section-card .card-header {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 20px 30px;
    border-radius: 10px 10px 0 0 !important;
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.section-card .card-header i {
    font-size: 1.8rem;
    margin-right: 15px;
    color: var(--white);
}

.section-card .card-body {
    padding: 30px;
    font-size: 1rem;
    color: var(--text-light);
}

.highlight {
    background: var(--accent-light);
    border-left: 5px solid var(--accent);
    padding: 20px 25px;
    margin: 25px 0;
    border-radius: 0 8px 8px 0;
    color: var(--text-dark);
}

.highlight h4 {
    color: var(--accent);
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.highlight p {
    margin-bottom: 0;
    font-size: 0.95rem;
}

.text-accent {
    color: var(--accent) !important;
}

.content-section h4 {
    color: var(--primary);
    margin-top: 35px;
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-light);
    font-size: 1.4rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.content-section h4 i {
    color: var(--primary);
    font-size: 1.5rem;
}

.content-section h5 {
    color: var(--text-dark);
    margin-top: 25px;
    margin-bottom: 15px;
    font-size: 1.15rem;
    font-weight: 600;
}

.content-section ul {
    padding-left: 25px;
    list-style: none;
}

.content-section ul li {
    margin-bottom: 10px;
    position: relative;
    padding-left: 25px;
}

.content-section ul li::before {
    content: "\f058";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    color: var(--accent);
    position: absolute;
    left: 0;
    top: 2px;
    font-size: 0.9em;
}

.subscription-alert {
    background: var(--primary-light);
    border-left: 5px solid var(--primary);
    padding: 20px;
    margin: 30px 0;
    display: flex;
    align-items: flex-start;
    border-radius: 8px;
    gap: 15px;
}

.subscription-alert i {
    color: var(--accent);
    font-size: 2.2rem;
    margin-right: 10px;
    flex-shrink: 0;
}

.subscription-alert h5 {
    color: var(--accent);
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 1.2rem;
    font-weight: 600;
}

.subscription-alert p {
    margin-bottom: 0;
    font-size: 0.95rem;
    color: var(--text-dark);
}

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    display: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--white);
    text-align: center;
    line-height: 50px;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.back-to-top:hover {
    background: #b0123f;
    /* darken approx 10% */
    transform: translateY(-3px);
}

/* Responsive Adjustments */
@media (max-width: 991.98px) {
    .fixed-header {
        padding: 15px 0;
    }

    .fixed-header h1 {
        font-size: 1.8rem;
        flex-direction: column;
        gap: 5px;
    }

    .fixed-header h1 i {
        font-size: 1.6rem;
    }

    .fixed-header p {
        font-size: 0.95rem;
    }

    /* The margin-top and scroll-margin-top are set dynamically by JS on resize */
    .content-wrapper {
        /* fallback */
    }

    section[id],
    div[id] {
        /* fallback */
    }

    .policy-nav {
        position: relative;
        top: 0;
        margin-bottom: 30px;
    }

    .policy-nav .card {
        border-radius: 8px;
    }

    .policy-nav .card-header {
        padding: 15px 20px;
        font-size: 1rem;
    }

    .policy-nav .nav {
        flex-direction: row !important;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 10px;
        -webkit-overflow-scrolling: touch;
    }

    .policy-nav .nav::-webkit-scrollbar {
        height: 8px;
    }

    .policy-nav .nav::-webkit-scrollbar-thumb {
        background-color: var(--primary-light);
        border-radius: 10px;
    }

    .policy-nav .nav::-webkit-scrollbar-track {
        background-color: #f1f1f1;
    }

    .policy-nav .nav-link {
        white-space: nowrap;
        border-left: none;
        border-bottom: 4px solid transparent;
        margin-right: 5px;
        padding: 10px 15px;
        font-size: 0.9rem;
    }

    .policy-nav .nav-link.active {
        border-left: none;
        border-bottom: 4px solid var(--primary);
    }

    .policy-nav .nav-link i {
        margin-right: 8px;
        font-size: 1rem;
    }

    .section-card .card-header {
        font-size: 1.2rem;
        padding: 18px 25px;
    }

    .section-card .card-header i {
        font-size: 1.5rem;
    }

    .section-card .card-body {
        padding: 20px;
    }

    .highlight {
        padding: 15px 20px;
        margin: 20px 0;
    }

    .highlight h4 {
        font-size: 1.1rem;
    }

    .content-section h4 {
        font-size: 1.2rem;
        margin-top: 25px;
    }

    .content-section h4 i {
        font-size: 1.3rem;
    }

    .content-section h5 {
        font-size: 1rem;
    }

    .subscription-alert {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .subscription-alert i {
        margin-right: 0;
        margin-bottom: 10px;
    }
}
